#include <iostream>
#include <string>
#include <vector>
using namespace std;

int main() {
    string namestr;
    string name;
    while (getline(cin, namestr))
    {
        getline(cin, name);
        vector<string> stringarr;
        string tmpname;
        bool flag = true;
        for (const auto& ch : namestr)
        {
            if (ch == '"')
            {
                flag = !flag;
                continue;
            }
            if ((!flag && ch == ',') || (!flag && ch == ' '))
            {
                tmpname += ch;
                continue;
            }
            if (flag && ch == ',')
            {
                stringarr.push_back(tmpname);
                tmpname.clear();
                continue;
            }
            tmpname += ch;
        }
        stringarr.push_back(tmpname);
        int i = 0;
        for (i = 0; i < stringarr.size(); ++i)
        {
            if (name.compare(stringarr[i]) == 0)
            {
                cout << "Important!" << endl;
                break;
            }
        }
        if (i == stringarr.size())
            cout << "Ignore" << endl;
    }
    return 0;
}//Joe, Kewell, "Quan,William", "Letendre, Btuce", Leon